* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1e1e2e;
    color: #cdd6f4;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #313244 0%, #1e1e2e 100%);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

h1 {
    margin-bottom: 10px;
    color: #74c7ec;
}

.description {
    color: #a6adc8;
    max-width: 800px;
    margin: 0 auto;
}

.control-panel {
    background-color: #313244;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.input-group {
    display: flex;
    margin-bottom: 15px;
    gap: 10px;
}

input[type="text"] {
    flex: 1;
    padding: 12px;
    border: 1px solid #45475a;
    border-radius: 5px;
    background-color: #45475a;
    color: #cdd6f4;
}

input[type="text"]:focus {
    outline: none;
    border-color: #74c7ec;
}

input[type="text"]::placeholder {
    color: #a6adc8;
}

button {
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    background-color: #74c7ec;
    color: #1e1e2e;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #89dceb;
}

button:disabled {
    background-color: #a6adc8;
    cursor: not-allowed;
}

button.remove {
    background-color: #f38ba8;
}

button.remove:hover {
    background-color: #f5c2e7;
}

button.pause {
    background-color: #f9e2af;
    color: #1e1e2e;
}

button.resume {
    background-color: #a6e3a1;
    color: #1e1e2e;
}

button.stop {
    background-color: #f38ba8;
    color: #1e1e2e;
}

.video-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.video-wrapper {
    background-color: #313244;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

.video-header {
    padding: 12px 15px;
    background-color: #45475a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.video-title {
    font-weight: bold;
    color: #74c7ec;
}

.video-controls {
    display: flex;
    gap: 8px;
}

.video-controls button {
    padding: 6px 12px;
    font-size: 0.9em;
}

.video-content {
    position: relative;
    height: 250px;
    background-color: #1e1e2e;
    display: flex;
    justify-content: center;
    align-items: center;
}

canvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.status {
    padding: 10px 15px;
    background-color: #45475a;
    font-size: 0.9em;
    display: flex;
    justify-content: space-between;
}

.stream-url {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 250px;
}

.connection-status {
    display: flex;
    align-items: center;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.connected {
    background-color: #a6e3a1;
}

.disconnected {
    background-color: #f38ba8;
}

.connecting {
    background-color: #f9e2af;
}

.paused {
    background-color: #f9e2af;
}

.no-streams {
    text-align: center;
    padding: 40px;
    color: #a6adc8;
    grid-column: 1 / -1;
}

.instructions {
    background-color: #313244;
    padding: 20px;
    border-radius: 10px;
    margin-top: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.instructions h3 {
    color: #74c7ec;
    margin-bottom: 15px;
}

.instructions ul {
    margin-left: 20px;
}

.instructions li {
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .video-container {
        grid-template-columns: 1fr;
    }

    .input-group {
        flex-direction: column;
    }

    .video-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .video-controls {
        width: 100%;
        justify-content: space-between;
    }
}